import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store/store'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

/*
const debounce = (fn, delay) =>{
    let timer = null;
    return function (){
        let context = this;
        let args = arguments;
        clearTimeout(timer);
        timer = setTimeout(function (){
            fn.apply (context,args);
        }, delay);
    }
}
const _Resizeobserver = window.Resize0bserver;
window.ResizeObserver = class ResizeObserver extends _Resizeobserver{
    constructor(callback) {
        callback = debounce(callback,16);
        super(callback);
    }
}
*/




for(const [key,component] of Object.entries(ElementPlusIconsVue)){
    app.component(key,component)
}

app.use(ElementPlus)
app.use(router)
app.use(store)
app.mount('#app')
